﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PIM_ATE
{
    class JcPIMDataSettings
    {
        bool bhigh = false;
        /// <summary>
        /// 互调高低频模式(false)
        /// </summary>
        public bool isHigh { get { return bhigh; } set { bhigh = value; } }

        /// <summary>
        /// 互调测试方案，REV/FWD
        /// </summary>
        public ImSchema Schema { get; set; }

        /// <summary>
        ///  互调测试模式，频率扫描、时间扫描
        /// </summary>
        public ImMode Mode { get; set; }

        /// <summary>
        ///  互调测试阶数，3、5、7、9阶
        /// </summary>
        public ImOrder Order { get; set; }

        /// <summary>
        ///  互调值的单位，dBc/dBm
        /// </summary>
        public ImUnit Unit { get; set; }

        /// <summary>
        ///  互调功率1
        /// </summary>
        public double TX1 { get; set; }

        /// <summary>
        ///  互调功率2
        /// </summary>
        public double TX2 { get; set; }

        /// <summary>
        ///  互调扫频步进1, 0标示不设置
        /// </summary>
        public double Step1 { get; set; }

        /// <summary>
        ///  互调扫频步进2, 0标示不设置
        /// </summary>
        public double Step2 { get; set; }

        /// <summary>
        ///  互调扫频步进rx, 0标示不设置
        /// </summary>
        public double StepRx { get; set; }

        /// <summary>
        ///  互调点频时间, 单位秒
        /// </summary>
        public int Time { get; set; }

        /// <summary>
        ///  互调LIMIT
        /// </summary>
        public double Limit { get; set; }

        /// <summary>
        ///  设置频率段f1起始
        /// </summary>
        public double F1s { get; set; }

        /// <summary>
        ///  设置频率段f1结束
        /// </summary>
        public double F1e { get; set; }

        /// <summary>
        ///  设置频率段f2起始
        /// </summary>
        public double F2s { get; set; }

        /// <summary>
        ///  设置频率段f2结束
        /// </summary>
        public double F2e { get; set; }

        /// <summary>
        ///  设置频率段rx起始
        /// </summary>
        public double RXs { get; set; }

        /// <summary>
        /// 设置频率段rx结束
        /// </summary>
        public double RXe { get; set; }

        /// <summary>
        /// TX1频段序号, 柜式机使用字段
        /// </summary>
        public byte Band_TX1 { get; set; }

        /// <summary>
        /// TX2频段序号, 柜式机使用字段
        /// </summary>
        public byte Band_TX2 { get; set; }

        /// <summary>
        /// RX频段序号, 柜式机使用字段
        /// </summary>
        public byte Band_RX { get; set; }

        /// <summary>
        /// 频段名称, 台式机使用字段
        /// </summary>
        public string Band_Name { get; set; }

        /// <summary>
        /// TX1频段序号
        /// </summary>
        public byte Port_TX1 { get; set; }

        /// <summary>
        /// TX2频段序号
        /// </summary>
        public byte Port_TX2 { get; set; }

        /// <summary>
        /// RX频段序号
        /// </summary>
        public byte Port_RX { get; set; }

        /// <summary>
        /// 补偿1
        /// </summary>
        public double Offset1 { get; set; }

        /// <summary>
        /// 补偿2
        /// </summary>
        public double Offset2 { get; set; }

        /// <summary>
        /// RX补偿
        /// </summary>
        public double Offset_RX { get; set; }

        /// <summary>
        /// 敲击
        /// </summary>
        public bool IsKnock { get; set; }

        /// <summary>
        /// 当前仪表类型
        /// </summary>
        public Instrument InstrumentType { get; set; }

        /// <summary>
        /// 接收通道
        /// </summary>
        public int Channel { get; set; }

        public double F1Set { get; set; }
        public double F2Set { get; set; }

        public bool isRandom { get; set; }
        public double RandomMax { get; set; }
        public double RandomMin { get; set; }

        /// <summary>
        /// 构造
        /// </summary>
        public JcPIMDataSettings()
        {
            this.isHigh = false;
            this.Mode = ImMode.Freq;
            this.Unit = ImUnit.dBm;
            this.Order = ImOrder.Im3;
            this.Schema = ImSchema.REV;
            this.Time = 30;
            this.Step1 = 0;
            this.Step2 = 0;
            this.StepRx = 0;
            this.TX1 = 43;
            this.TX2 = 43;
            this.F1s = 0;
            this.F1e = 0;
            this.F2s = 0;
            this.F2e = 0;
            this.Offset1 = 0;
            this.Offset2 = 0;
            this.Offset_RX = 0;
            this.Band_TX1 = 0;
            this.Band_TX2 = 0;
            this.Band_RX = 0;
            this.Band_Name = "";
            this.Port_TX1 = 0;
            this.Port_TX2 = 0;
            this.Port_RX = 0;
            this.F1Set = 0;
            this.F2Set = 0;
            this.isRandom = false;
            this.RandomMax = 0;
            this.RandomMin = 0;
            this.Channel = 0;
        }
    }
}
